

/* unsigned % unsigned */
#ifndef __mc68010__
ENTRY(__umodsi3)
	movel	4(%sp),%d1
#ifdef __mcoldfire__
	remul	8(%sp),%d0:%d1
	divul	8(%sp),%d1
#else
	divull	8(%sp),%d0:%d1
#endif
	rts
END(__umodsi3)
#else
ENTRY(__umodsi3)
| NB: this requires that __udivsi3 preserve the %a0
| register, and that it returns the modulus in %d1:
	movel	(%sp)+, %a0	| pop the return address
	jsr	_C_LABEL(__udivsi3)
	movel	%d1, %d0	| move the modulus into %d0
	jmp	(%a0)		| return
END(__umodsi3)
#endif /* __mc68010__ */
